package com.ld.control.business.equipment.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ld.control.business.equipment.model.EquipmentMethodTmpModel;
import com.ld.control.business.equipment.vo.req.EquipmentMethodTmpReqVo;
import com.ld.control.business.equipment.vo.req.MethodDebugReqVo;
import com.ld.control.business.equipment.vo.resp.EquipmentMethodTmpRespVo;
import com.ld.control.business.equipment.vo.resp.MethodDebugRespVo;
import java.util.List;

/**
 * <p>
 * 设备方发表 服务类
 * </p>
 *
 * @author wangfeng
 * @since 2024-04-17
 */
public interface EquipmentMethodTmpService extends IService<EquipmentMethodTmpModel> {

    /**
     * 添加设备方法模板
     * @param reqVo
     */
    void add(EquipmentMethodTmpReqVo reqVo);

    /**
     * 修改设备方法
     * @param reqVo
     */
    void update(EquipmentMethodTmpReqVo reqVo);

    /**
     * 删除设备方法
     * @param id
     */
    void deleteById(Long id);

    /**
     * 查询方法详情
     * @param id
     * @return
     */
    EquipmentMethodTmpRespVo getById(Long id);

    /**
     * 查询某个设备的所有方法
     * @param equipmentId
     * @return
     */
    List<EquipmentMethodTmpRespVo> getList(Long equipmentId, Integer debugFlag);

    /**
     * 发送方法调试
     * @param reqVo
     * @return
     */
    MethodDebugRespVo sendDebugMethod(MethodDebugReqVo reqVo);

    /**
     * 发送设备警报
     * @param equipmentCode
     * @return
     */
    void setErrorAlarm(String equipmentCode, String param);

}
